package mortal.common.cd
{
	import flash.utils.*;
	
	public class KeyBoardCd extends Object
	{
		private static var _keyMap:Dictionary = new Dictionary();
		
		public function KeyBoardCd()
		{
			
		}
		
		public static function isKeyDown(code:int) : Boolean
		{
			var timer:Number = _keyMap[code];
			if (getTimer() > timer)
			{
				return true;
			}
			return false;
		}
		
		public static function keyUp(code:int) : void
		{
			_keyMap[code] = getTimer() + 200;
			
		}
	}
}
